import {
    createRouter,
    createWebHistory
} from "vue-router";

let router = createRouter({
    history: createWebHistory(),
    routes: [{
            path: '/login',
            name: 'login',
            component: () => import('../pages/login.vue')
        },
        {
            path: '/',
            component: () => import('../components/Home.vue'),
            children: [{
                    path: '/',
                    name: 'home',
                    component: () => import('../pages/home.vue')
                },
                // 框图
                {
                    path: '/blockDiagramAdd',
                    name: 'blockDiagramAdd',
                    component: () => import('../pages/blockDiagram/blockDiagramAdd.vue')
                },
                // 框图详情
                {
                    path: '/blockDiagramDtl&:id&:isReadOnly',
                    name: 'blockDiagramDtl',
                    component: () => import('../pages/blockDiagram/blockDiagramDtl.vue')
                },
                // 框图列表
                {
                    path: '/blockDiagramList',
                    name: 'blockDiagramList',
                    component: () => import('../pages/blockDiagram/blockDiagramList.vue')
                },
                // 框图展示
                {
                    path: '/blockDiagram&:projectNo&:projectName&:system',
                    name: 'blockDiagram',
                    component: () => import('../pages/blockDiagram/blockDiagram.vue')
                },

                // 项目列表
                {
                    path: '/projectList',
                    name: 'projectList',
                    component: () => import('../pages/blockDiagram/projectList.vue')
                },
                // 甘特图
                {
                    path: '/gstc',
                    name: 'gstc',
                    component: () => import('../pages/gstc.vue')
                },
                // 分部/分项名称维护
                {
                    path: '/addProgress',
                    name: 'addProgress',
                    component: () => import('../pages/projectProgress/addProgress.vue')
                },
                // 进度模版维护
                {
                    path: '/scheduleTemplateMaintenance',
                    name: 'scheduleTemplateMaintenance',
                    component: () => import('../pages/projectProgress/scheduleTemplateMaintenance.vue')
                },
                // 进度模版维护列表
                {
                    path: '/scheduleTemplateMaintenanceList',
                    name: 'scheduleTemplateMaintenanceList',
                    component: () => import('../pages/projectProgress/scheduleTemplateMaintenanceList.vue')
                },
                // 进度模版维护详情
                {
                    path: '/scheduleTemplateMaintenanceDtl&:id&:isReadOnly',
                    name: 'scheduleTemplateMaintenanceDtl',
                    component: () => import('../pages/projectProgress/scheduleTemplateMaintenanceDtl.vue')
                },

                // 创建二级进度表
                {
                    path: '/createSecondarySchedule',
                    name: 'createSecondarySchedule',
                    component: () => import('../pages/secondarySchedule/createSecondarySchedule.vue')
                },
                // 二级进度表详情
                {
                    path: '/secondaryScheduleDtl&:id&:isReadOnly',
                    name: 'secondaryScheduleDtl',
                    component: () => import('../pages/secondarySchedule/secondaryScheduleDtl.vue')
                },
                // 二级进度表列表
                {
                    path: '/secondaryScheduleList',
                    name: 'secondaryScheduleList',
                    component: () => import('../pages/secondarySchedule/secondaryScheduleList.vue')
                },
                // 任务列表
                {
                    path: '/jobList',
                    name: 'jobList',
                    component: () => import('../pages/secondarySchedule/jobList.vue')
                },
                // 一览表
                {
                    path: '/secondarySchedule',
                    name: 'secondarySchedule',
                    component: () => import('../pages/secondarySchedule/secondarySchedule.vue')
                },
            ]
        },
        // 甘特图
        // {
        //     path: '/gstc',
        //     name: 'gstc',
        //     component: () => import('../pages/gstc.vue')
        // }
    ]
})

export default router;